Bench 121 rfc787 standard messages#24
Conversation
|
I've made a fork too while I was waiting for a response shivanshs9/drf-problems#11, if the author gives me a better solution I can get rid of it I guess |
|
With this push I refactored all of the errors to be compliant with the specs, not really happy about how it handles them tbh, I might decide to get rid of |
d92c815 to
96ed21b
Compare
… to be merged, fixes error codes using drf-problems
365aa2b to
bc6fb1e
Compare
| error_msg, | ||
| status=status.HTTP_400_BAD_REQUEST, | ||
| ) | ||
| raise HttpErrorResponse(status=status.HTTP_400_BAD_REQUEST) |
There was a problem hiding this comment.
How is the detail from the error captured?
There was a problem hiding this comment.
DRF handles the exceptions, drf-problems allows us to define custom content, I defined the content in HttpErrorResponse
| if isinstance(exc, ObjectDoesNotExist): | ||
| return HttpErrorResponse( | ||
| status=status.HTTP_404_NOT_FOUND, | ||
| detail="Object was not Found", | ||
| title="Resource not found", | ||
| extensions={"errors": exc.args}, |
There was a problem hiding this comment.
If we only use getor404 would we still need that? when is that called?
There was a problem hiding this comment.
yes, because we need to add the details that otherwise are not there
There was a problem hiding this comment.
But would it still raise ObjectDoesNotExist?
There was a problem hiding this comment.
mh, no that should just raise Http404 as far as I remember
| class CategoryDetailView( | ||
| mixins.RetrieveModelMixin, | ||
| UpdateMixin, | ||
| RetireMixin, | ||
| GetNotFoundDetailMixin, | ||
| UpdateNotFoundDetailMixin, | ||
| UpdateIntegrityHandlerMixin, | ||
| UpdateErrorDetailMixin, | ||
| mixins.DestroyModelMixin, | ||
| generics.GenericAPIView, |
There was a problem hiding this comment.
Which update is called here? you have an update in UpdateIntegrityHandlerMixin, UpdateNotFoundDetailMixin and UpdateErrorDetailMixin
| class UpdateIntegrityHandlerMixin(UpdateModelMixin): | ||
| def update(self, request: Request, *args, **kwargs) -> Response: | ||
| try: | ||
| return super().update(request, *args, **kwargs) | ||
| except IntegrityError as exc: | ||
| return duplicate_check(exc) | ||
|
|
||
|
|
||
| class RetireMixin(UpdateModelMixin): | ||
| def retire(self, request: Request, *args, **kwargs) -> Response: | ||
| request.data["retired"] = True | ||
| return super().partial_update(request, *args, **kwargs) | ||
| return handle_IntegrityError(exc) |
There was a problem hiding this comment.
Can you combine this and UpdateErrorDetailMixin, UpdateNotFoundDetailMixin to one class?
| for order_item in order_items_data: | ||
| item_data: ItemType = order_item.pop("item") | ||
| item: Item = get_object_or_404(Item, pk=item_data["id"]) | ||
| item: Item = get_object_or_404(Item, pk=item_data["id"]) # type: ignore[reportTypedDictNotRequiredAccess] |
There was a problem hiding this comment.
why ignoring type error here?
| "detail": "A server error occurred.", | ||
| "status": 400, | ||
| "title": "A server error occurred.", | ||
| "type": "http://testserver/problems/error/", |
There was a problem hiding this comment.
I feel like this error message is a bit vague. Is there anyway we can tell they user that the item already exists in the category?
There was a problem hiding this comment.
maybe put it in the detail field?
| # Arrange | ||
| invalid_post_data: ItemType = { | ||
| "name": "Bad data", | ||
| "price": "1.50asd", # type: ignore[reportGeneralTypeIssues] |
There was a problem hiding this comment.
what happens if we put price with more than 2 decimal places? does it round or does it error? also is there a test for this?
There was a problem hiding this comment.
also does the price have to be sent as a string or can it be sent as a number?
There was a problem hiding this comment.
both strings and numbers work
There was a problem hiding this comment.
I don't want to add additional tests for the moment, because it wasn't the point of this PR, because most of the codebase will be changed by the next 2 PR and moreover because the tests needs a major refactor the code is out of control.
I'm happy to do a refactoring to the tests with a separate ticket.
| self.assertEqual(response.status_code, 200) | ||
|
|
||
| def test_put_invalid_id_returns_bad_request(self): | ||
| # Arrange |
There was a problem hiding this comment.
why was this test deleted?
There was a problem hiding this comment.
Because it's actually changed and returns not found now I can add it back but there is not point, it's already tested on delete and get.
This test changes can be moved in a separate PR
| "detail": "Validation Error", | ||
| "errors": { | ||
| "description": ["Enter a valid value."], | ||
| "name": ["Enter a valid value."], |
There was a problem hiding this comment.
error messages on this are a bit vague, can we tell them the invalid character?
| "details": "Item not in order", | ||
| } | ||
| expected: DetailError = { | ||
| "detail": "A server error occurred.", |
There was a problem hiding this comment.
can we let them know that the item wasn't in the order in the first place?
There was a problem hiding this comment.
There is no option to delete item_order like this anymore. we can delete this test
| invalid_post_data: OrderType = {"address": "test%"} | ||
| expected: DetailError = { | ||
| "detail": "Validation Error", | ||
| "errors": {"address": ["Enter a valid value."]}, |
There was a problem hiding this comment.
can we highlight the bad character(s)
There was a problem hiding this comment.
not sure what you mean, if the serializer.error supports it sure, not that I'm aware, this errors are autogenerated by it
| invalid_post_data: OrderType = {"address": "test&"} | ||
| expected: DetailError = { | ||
| "detail": "Validation Error", | ||
| "errors": {"address": ["Enter a valid value."]}, |
There was a problem hiding this comment.
can we highlight the characters that are not allowed
| } | ||
| expected: DetailError = { | ||
| "detail": "Object was not Found", | ||
| "errors": ["Status matching query does not exist."], |
There was a problem hiding this comment.
don't quite follow this error? would it not be better to put "invalid status given"?
There was a problem hiding this comment.
I don't think we can update status of an order like this anymore. can also delete this one.
There was a problem hiding this comment.
ok, I'll leave it for the moment, can be deleted in other branches
| retired: bool | ||
| class CategoryType(TypedDict): | ||
| id: NotRequired[int] | ||
| name: NotRequired[str] |
There was a problem hiding this comment.
why is name a not required field?
There was a problem hiding this comment.
Because sometimes it's used partially without "name" in the tests, that's just for typing not the actual model
| quantity: int | ||
| class OrderType(TypedDict): | ||
| id: NotRequired[int] | ||
| address: NotRequired[str] |
There was a problem hiding this comment.
should this not be required?
There was a problem hiding this comment.
there is no address in order anymore as well. Sorry Joe😅
* Add poetry to manage dependencies * Remove name from toml file and separate dependencies * Remove requirements.txt * Remove blank line * Add pycodestyle and coverage * BENCH-62 patch test_get_all_without_categories_returns_no_content test case (#12) * BENCH-65: Updated README.md and added .editorconfig * Bench 48 update typing to models (#9) update typing into models, validators and serializers * Bench 47 refactor with typing test items (#10) * Adds typing to items tests * moved ErrorType in views Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench 53 refactor with typing test categories (#11) * Adds typing in categories tests * BENCH-49: Add typing to answerking_app services * BENCH-50: Update views with typing * add typing to urls folder and apps.py * BENCH-55: Update orderline tests with typing * Bench 54 refactor with typing test orders (#15) Added typing to test orders * BENCH-77: Add Makefile and reformat * BENCH-61-update-views-with-djangoRESTframework * Bench 75 update serializer with DRF (#19) * Updated Serializers and models to support DRF * updated order service to support the serializer * fixed typehints * minor code changes * fixed wrong decimal size in serializer * now using partial=True for partial updates, and required=False in some serializer fields * fixed uninque key missing from the model, and fixed related code Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench 75 update serializer with DRF (#19) (#20) * Updated Serializers and models to support DRF * Also fixed test errors * BENCH-78: Refactor to use DRF mixins (#21) * BENCH-115: Configure swagger and split base and dev settings * BENCH-70-compile and build answerking app using github-actions (#22) * Create ci.yml for CI workflow * added unit tests and tests for linting and type checking * separated out tests into different steps for better reporting * Bench 129 fix category bug (#25) Bug fixed, Created and update methods add to category serializer * Updated Migration workflow job for ci.yml * Bench 122 add retired field to models (#26) add retired to items and category models * Bench 146 caching package dependencies (#29) * cach poetry dependencies * poetry.lock file not ignored as used in github workflow * exclude migrations file from black test * Bench 121 rfc787 standard messages (#24) * added drf-problems dependency * fixes middleware 404, temporarly in the codebase, awaiting for the PR to be merged, fixes error codes using drf-problems * replaced Responses to Raise Exception * temporarly changed dependencies to forks, awaiting for merge * Defined generic Exception Class * Renamed integrityHandlerMixin * added detail handle for serializer Errors * Added detail handle for 404 errors * added typing_extensions to dependencies * added specific type ignore Co-authored-by: pietro convalle <pietroconvalle@python.it> * BENCH-158-change-pipeline-to-run-poetry-install * changed packages for tool.poetry in toml file to sort poetry install error * changed poetry update to install for workflow jobs * BENCH-164-refactor-tests (#33) * removed hardcoded strings and operations from tests Co-authored-by: pietro convalle <pietroconvalle@python.it> * Improve docs/setup for first run (#34) * First draft of changes * Slight tweak to README to follow the way returns have been done * BENCH-177 refactor exception handlers (#35) * moved mixins handlers in exceptions_handler.wrapper Co-authored-by: pietro convalle <pietroconvalle@python.it> * BENCH-132-dependabot (#36) * Create sonarcloud.yml * BENCH-97 sonar cloud code analysis (#37) * created sonarcloud workflow and moved dependency action in separate workflow Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench-123: Contract refactor (#32) Refactor models, serializers, views and tests to fit the new api structure * bug fixed (#40) * BENCH-229-Fix-TestBase-abstract-methods (#41) change TestBase to inherent TransactionTestCase * BENCH-230-Add-400-status-path-in-all-GET-by-id-methods (#42) * Create a check url parameter function Co-authored-by: pietro convalle <pietroconvalle@python.it> * Refactor /items tests (#38) * Bench 97 sonar analysis fix warnings (#39) * changed permissions location * added python version and removed coverage path * updated poetry.lock and formatting * renamed ci file and removed makemigrations step * cleaned up the sonarcloud test workflow and fixes warnings Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench 152 write unit tests for LineItemSerializer, CategorySerializer and CategoryDetailSerializer (#46) * changed max-line-length to 100 to ignore E501 error (dont use --ignore as this overrides default ignored error messages) * created white_space function unit tests * created fixtures for unit tests * created UnitTestBase * created unit tests for models * created unit tests for line item serializer * created unit tests for category detail serializer * created unit tests for category serializer * BENCH-246: Write unit tests for product serializers (#47) * Bump certifi from 2022.9.24 to 2022.12.7 (#48) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](certifi/python-certifi@2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JoeCSykes <91789402+JoeCSykes@users.noreply.github.com> * Bump django from 4.1.3 to 4.1.4 (#49) Bumps [django](https://github.com/django/django) from 4.1.3 to 4.1.4. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@4.1.3...4.1.4) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JoeCSykes <91789402+JoeCSykes@users.noreply.github.com> * created docker file and updated docker-compose * minor changed, added some information to the ReadMe * fixed port error * removed not used args from DockerFile * added branch argument in docker file * removed file .env from docker compose and added explicit environtment * added publish workflow * moved entrypoint in DockerFile * updated README * test package workflow * added workflow dispatch * renamed workflow file * added workflow on_pull_request * trigger workflows * added dockerfile name * added image field * added migrations and timezone dependencies * condensed DockerFile * testing docker workflow * trigger on pull request * changed name of docker file * added wait func to ensure db is up before running app * corrected so can send requests + updated ReadMe details * run make prepare + changed git ignore to ignore any file starting with .env * Delete .env.production * supplied database engine value to env variables * Update test.yml * Bench 89 add integration test step to workflow (#55) * create integration test workflow * correct typo in workflow * added environment variables * added database service * Bench 89 add integration test step to workflow (#56) * create integration test workflow * correct typo in workflow * added enviroment variables * added datavase service * added workflow dispatch tag so we can run workflow manually * merged linting workflow and unit test / sonar cloud workflow together (#57) * merged linting workflow and unit test / sonar cloud workflow together * added names to jobs * added DATABASE_ENGINE variable to environment * changed so runs unit tests only * Bench 105 create docker image (#44) * created docker file * created docker-compose * added steps to deploy app in docker container locally to the ReadMe * added waitForDB command to ensure db is up before running app * changed git ignore to ignore any file starting with .env Co-authored-by: pietro convalle <pietroconvalle@python.it> Co-authored-by: Joseph Sykes <joseph.c.sykes@outlook.com> * BENCH-271: Write unit tests for utils (#54) * Bench 258 unit tests for order serializer (#52) Created unit test for order serializer and change check_products function to be part of the utils * Bump django from 4.1.4 to 4.1.5 (#59) Bumps [django](https://github.com/django/django) from 4.1.4 to 4.1.5. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@4.1.4...4.1.5) --- updated-dependencies: - dependency-name: django dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pytz from 2022.6 to 2022.7 (#58) Bumps [pytz](https://github.com/stub42/pytz) from 2022.6 to 2022.7. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](stub42/pytz@release_2022.6...release_2022.7) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JoeCSykes <91789402+JoeCSykes@users.noreply.github.com> * BENCH-267-return-204-for-all-delete-methods * Changed delete methods to return 204 * BENCH-285-configure-sonarcloud (#61) * added path of coverage.xml to sonar cloud arguments for CI job * correcting code smells from sonarcloud * removed ignored coverage files in code and ignored them in sonar cloud directly * update "unit test and sonarcloud job to use V3 of checkout action (#64) * BENCH-186: Add OpenAPI documentation (#63) * Bump pytz from 2022.7 to 2022.7.1 (#66) Bumps [pytz](https://github.com/stub42/pytz) from 2022.7 to 2022.7.1. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](stub42/pytz@release_2022.7...release_2022.7.1) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump python-dotenv from 0.21.0 to 0.21.1 (#68) Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.21.0 to 0.21.1. - [Release notes](https://github.com/theskumar/python-dotenv/releases) - [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md) - [Commits](theskumar/python-dotenv@v0.21.0...v0.21.1) --- updated-dependencies: - dependency-name: python-dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pyright from 1.1.288 to 1.1.290 (#69) Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.288 to 1.1.290. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](RobertCraigie/pyright-python@v1.1.288...v1.1.290) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JoeCSykes <91789402+JoeCSykes@users.noreply.github.com> * Bump pyright from 1.1.290 to 1.1.291 (#71) Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.290 to 1.1.291. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](RobertCraigie/pyright-python@v1.1.290...v1.1.291) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * BENCH-297: Terraform AWS infrastructure (#70) * initial commit * Update README * Update README * Update README * Update README * add variable for port in db security group and edit README * update terraform * variables for host and container port * change to use gunicorn * add backend.tf * configure to be used with deploy github action * test * re install gunicorn * setup s3 backend * setup s3 backend * update providers with versions * Bench 349: Products set to have one category (#73) * Bench 276 sort integration tests for products and categories (#72) * created integration tests for products without categories * added extra snappshot tests * finish snapshots for categories GET requests and start snapshots for categories POST requests * added more integration test for cats + edited product_check so send list of ids in cat post request * completed integration tests for categories + added 410 test for products * ran make prepare * created integration tests for products without categories * added extra snappshot tests * finish snapshots for categories GET requests and start snapshots for categories POST requests * added more integration test for cats + edited product_check so send list of ids in cat post request * completed integration tests for categories + added 410 test for products * sorting out make prepare errors * run black * sorting out snapshots * shortening lines to comply with pycodestyle * run make prepare * sorted out code smells * sorting out code smells * exclude snapshot files from sonarcloud analysis * exclude snapshot files from sonarcloud analysis attempt 2 * exclude snapshot files from sonarcloud analysis attempt 3 * corrections due to PR BENCH-349 * made changes inline with PR comments * remove unused variable * Bench-371: GitHub action to deploy (#74) * initial commit * Update action and add back docker action * initial commit * Update action and add back docker action * update settings * lint * update action version * remove ecr file and update README * update README * Bench 338 implement tags endpoint (#76) * cretated model for tags * created serializer for tags + created unit test for tag serliaizer + set products to return tags field * run make prepare * create mixins for tags * added Tag endpoints * generated swagger ui endpoints for tags * sorted errors * sorted code smells * added numbers to the allowed regex + created unit tests for invalid prod id * ran make prepare and corrected the Makefile so didn't print out unnessesary error * Bump pyright from 1.1.291 to 1.1.292 (#78) Bumps [pyright](https://github.com/RobertCraigie/pyright-python) from 1.1.291 to 1.1.292. - [Release notes](https://github.com/RobertCraigie/pyright-python/releases) - [Commits](RobertCraigie/pyright-python@v1.1.291...v1.1.292) --- updated-dependencies: - dependency-name: pyright dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump django from 4.1.5 to 4.1.6 (#77) Bumps [django](https://github.com/django/django) from 4.1.5 to 4.1.6. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@4.1.5...4.1.6) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * added ignore slashs middleware (#81) Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench 343 create integration test for tags (#80) * initial commit * created get and post integration tests for tags * written PUT and DELETE integration tests for tags endpoints * run make prepare * correcting some tests * added IG tests for POST to api/tags with invalid prod id and nonexistant prod id * run make prepare * Bench-378 and bench-381 retire (#79) * Added update method in RetireMixin and integration and unit tests * Fixed inheritance of Tag/Product/Category view * changed sonar exclusion list --------- Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench-372: Add load balancer and attach elastic ip & domain name (#75) * initial commit * Update action and add back docker action * initial commit * assign variables to reused values * assign variables to reused values * add record connected to existing dns hosted zone * test * test * test acl * test acl * format * remove ECR file * update README * update README * update diagram in README * Update README.md * Update README.md * Bench 369 orders integration tests (#82) * Bump drf-yasg from 1.21.4 to 1.21.5 (#83) Bumps [drf-yasg](https://github.com/axnsan12/drf-yasg) from 1.21.4 to 1.21.5. - [Release notes](https://github.com/axnsan12/drf-yasg/releases) - [Changelog](https://github.com/axnsan12/drf-yasg/blob/1.21.5/docs/changelog.rst) - [Commits](axnsan12/drf-yasg@1.21.4...1.21.5) --- updated-dependencies: - dependency-name: drf-yasg dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bench 421 fix id assignment bug (#85) * Bump django from 4.1.6 to 4.1.7 (#86) Bumps [django](https://github.com/django/django) from 4.1.6 to 4.1.7. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@4.1.6...4.1.7) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bench-424 order fix (#87) * changed orderLine POST and PUT field to match agreed API * fixed make file * changed code to use writeonly and readonly fields * updated tests for orders * dependency update * refactored products_check to products_check_retired --------- Co-authored-by: pietro convalle <pietroconvalle@python.it> * Bench 435 add range ip ban (#88) * added geolocation routing to only allow IP traffic from GB * added ban for no GB IP traffic * fix bugs in swagger generation (#89) * removed trailing slashes + changed update mixin to stop PATCH being generated * removed unnecessary imports * HTTPS-420 changed connection to https only (#91) * changed connection to https only * changed port to 443 and added django http redirection --------- Co-authored-by: pietro convalle <pietroconvalle@python.it> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: michael-osullivan <michael.osullivan@answerdigital.com> Co-authored-by: Abbas.Khan <Abbas.Khan@mft.nhs.uk> Co-authored-by: NogaAD <115239141+NogaAD@users.noreply.github.com> Co-authored-by: pietro convalle <pietroconvalle@python.it> Co-authored-by: JoeCSykes <91789402+JoeCSykes@users.noreply.github.com> Co-authored-by: Joseph Sykes <joseph.c.sykes@outlook.com> Co-authored-by: abbas-khan8 <abbas.khan@answerdigital.com> Co-authored-by: MichaelOSullivanAnswer <116073025+MichaelOSullivanAnswer@users.noreply.github.com> Co-authored-by: Joss Sparkes <joss.sparkes@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds custom errors, mixins handles are defined.
Changes to note:
HttpErrorResponsedefined in utils/mixins/ApiExceptions.pyI'm awaiting for the merge of: ah450/django-json-404-middleware#4 and shivanshs9/drf-problems#11